package org.jeecg.modules.job;


import lombok.extern.slf4j.Slf4j;

import org.jeecg.modules.foc.FocController;

import org.jeecg.modules.foc.service.IFocConfigService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class FocConfigJob implements Job {
    @Value("${ems.url}")
    public String emsUrl;


    @Autowired
    private FocController focController;

/**
     * 每天获取一次配置
     *
     * @param jobExecutionContext
     * @throws JobExecutionException*/


    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("foc配置获取任务开始执行");
        focController.jobConfig();
        log.info("foc配置获取任务结束");
    }
}
